package com.xbfinance.portal.web;

import com.xbfinance.portal.pojo.po.FormData;
import com.xbfinance.portal.service.PortalApplyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
@Controller
public class PortalApplyController {
    @Autowired
    private PortalApplyService portalApplyService;
    @RequestMapping(value = "/apply/item",method = RequestMethod.POST)

    public String insertItem(FormData formData){
        try {
            System.out.println(formData);

            portalApplyService.insertItem(formData);
        }catch (Exception e){
            e.printStackTrace();
        }
            return "redirect:/index";

    }
}
